package com.yuanchu.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuanchu.common.utils.PageResult;
import com.yuanchu.order.dto.CommentImageDto;
import com.yuanchu.order.dto.EditOrderCommentDto;
import com.yuanchu.order.dto.OrderCommentParamsDto;
import com.yuanchu.order.dto.QueryCommentParamsDto;
import com.yuanchu.order.entity.YoshopCommentEntity;
import com.yuanchu.order.entity.YoshopOrderGoodsEntity;

import java.util.List;

/**
 * 商品评价记录表
 *
 * @author adan
 * @email 2028038953@gmail.com
 * @date 2023-12-19 20:57:20
 */
public interface YoshopCommentService extends IService<YoshopCommentEntity> {

    /**
     * 查询订单评论
     *
     * @param orderId
     * @param userId
     * @return
     */
    List<YoshopOrderGoodsEntity> queryOrderComment(Integer orderId, Integer userId);

    /**
     * 提交订单评价
     *
     * @param params
     * @param userId
     * @return
     */
    boolean submitOrderComment(OrderCommentParamsDto params, Integer userId);

    /**
     * 查询商品评价
     *
     * @param params
     * @param storeId
     * @return
     */
    PageResult<CommentImageDto> queryGoodsComment(QueryCommentParamsDto params, int storeId);

    /**
     * 编辑订单评价
     *
     * @param params
     * @param storeId
     */
    void editOrderComment(EditOrderCommentDto params, int storeId);

    /**
     * 删除订单评价
     *
     * @param params
     * @param storeId
     */
    void deleteOrderComment(EditOrderCommentDto params, int storeId);

    /**
     * 查询商品评价详情
     *
     * @param commentId
     * @param storeId
     * @return
     */
    CommentImageDto queryGoodsCommentDetail(Integer commentId, int storeId);
}

